#include <stdio.h>
#include <stdlib.h>

typedef struct ArrNode *ArrPtr;
struct ArrNode {
    int *data; /*存储数据的数组*/
    int size; /*数组的大小*/
};

/* 算法1-3：将数组中元素反转存放 ReverseArray1(array) */
void ReverseArray1(ArrPtr array) {
    int i, n, t;

    n = array->size;
    for (i = 0; i < n / 2; i++) { /* 交换第i个和第n-i-1个元素的位置 */
        t = array->data[i];
        array->data[i] = array->data[n - i - 1];
        array->data[n - i - 1] = t;
    }
}
/* 算法1-3 结束 */

int main(void) {
    int i, n;
    ArrPtr array;

    array = (ArrPtr)malloc(sizeof(struct ArrNode));
    scanf("%d", &n);
    array->size = n;
    array->data = (int *)malloc(sizeof(int) * array->size);
    for (i = 0; i < n; i++) {
        scanf("%d", &array->data[i]);
    }
    ReverseArray1(array);
    for (i = 0; i < n; i++) {
        printf("%d ", array->data[i]);
    }
    return 0;
}